package cn.ilikes.tools.nosql.jpa.clients.handers;

import java.util.List;

import org.apache.hadoop.hbase.client.Result;
import org.slf4j.Logger;

import cn.ilikes.tools.logs.Loggerfactory;
import cn.ilikes.tools.nosql.jpa.JPASQLPersistenUnitEnv;
import cn.ilikes.tools.nosql.jpa.JPASQLRunTimeException;
import cn.ilikes.tools.nosql.jpa.clients.dataSources.hbases.HbaseDataSource;
import cn.ilikes.tools.nosql.jpa.graphs.Node;
import cn.ilikes.tools.nosql.jpa.metadatas.EntityMetaData;

public class DataHanderBaseImple {

	private Logger logger = Loggerfactory.instance(DataHanderBaseImple.class);

	private JPASQLPersistenUnitEnv persistenUnitEnv;

	public DataHanderBaseImple(JPASQLPersistenUnitEnv persistenUnitEnv) {
		super();
		this.persistenUnitEnv = persistenUnitEnv;
	}

	protected JPASQLPersistenUnitEnv getHbasePersistenUnitEnv() {
		return persistenUnitEnv;
	}

	public void init() {
		if (Loggerfactory.isdebug(logger)) Loggerfactory.debug(logger, " Data Hander init ");
	}

	public Result find(EntityMetaData entityMetaData, Object key) throws JPASQLDataHnaderException {

		throw new JPASQLRunTimeException("this  find no work");
	}

	public Result findId(EntityMetaData entityMetaData, Object key) throws JPASQLDataHnaderException {

		throw new JPASQLRunTimeException("this  find no work");
	}

	public byte[] findValue(EntityMetaData entityMetaData, Object key, String family, String qualifier) throws JPASQLDataHnaderException {

		throw new JPASQLRunTimeException("this  find no work");
	}

	public boolean isOpen() {
		throw new JPASQLRunTimeException("this  find no work");
	}

	public void remove(Node node) throws JPASQLDataHnaderException {
		throw new JPASQLRunTimeException("this  find no work");
	}

	public void save(Node node) throws JPASQLDataHnaderException {
		throw new JPASQLRunTimeException("this  find no work");
	}

	public Result[] seach(EntityMetaData entityMetaData, List keyIds) throws JPASQLDataHnaderException {

		throw new JPASQLRunTimeException("this  seach  no work");
	}

	public void update(Node node) throws JPASQLDataHnaderException {
		throw new JPASQLRunTimeException("this  find no work");

	}

	public void rollback() {
		throw new JPASQLRunTimeException("this  find no work");
	}

}